package com.city.eduservice.feignClient;

import com.city.commonutils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Cheng
 * Date: 2020/9/15
 * Time: 23:03
 * Description: No Description
 *
 * 调用者通过该接口调用nacos注册中心的服务
 */
@FeignClient(name = "service-vod",fallback = VodServiceFeignClientImpl.class)//调用的注册中心中的服务
@Component //交给spring管理
public interface VodServiceFeignClient {

    //定义服务模块中的哪个方法，写成接口
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")//全路径
    Result removeAlyVideo(@PathVariable("id") String id);//@PathVariable("id")必须指定路径中的变量名称

    @DeleteMapping("/eduvod/video/delete-batch")
    Result deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
